package com.gitee.candy;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Hello world!
 * 发布版本为Vx.0 例如V1.0、V2.0
 * 不成熟版本为V1.01 例如V0.01、V1.01
 */
public class App {

    public static void main(String[] args) {
        System.out.println("Hello World!");

        String str = "123abc这个中文cde123abc也要提取123ab";

        Pattern p = null;
        Matcher m = null;
        String value = null;
        p = Pattern.compile("([\\u4e00-\\u9fa5]+)");
        m = p.matcher(str);

        StringBuffer china = new StringBuffer();
        while (m.find()) {
            value = m.group(0);
            china.append(value);
        }
        System.out.println(china);
    }
}
